#include<stdio.h>
int main()
{   
    int N;
    scanf("%d",&N);
    if(N<100||N>999)
    {
  printf("Invalid Value");
}
    else
{
    int a = N / 100;
    int b = N%100 / 10;
    int c = N%10;
    if(a * a * a+b * b *b+c * c * c==N)
    {
    printf("Yes");
    }
    else
{
  printf("No");
}
    }
 return 0;
}
   

